#include "UdpServer.hpp"
#include <memory>
#include <cstdio>
#include <string>



void Usage(string proc)
{
    cout<<" Usage :"<<proc<<" port:"<<" 1024++ "<<endl;
}


// ./udpserver port
int main(int argc, char *argv[])
{
    if(argc != 2)
    {
        Usage(argv[0]);
    }
    uint16_t port = stoi(argv[1]);//字符串转成int

    unique_ptr<UdpServer> svr(new UdpServer(port));

    svr->Init();
    svr->run();

    return 0;
}